import java.util.Scanner;

public class TestCompany {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        Company com = new Company();
        com.cname = "子梅传媒公司";
        com.adress = "新蚌埠路1103号";
        com.scope = "售卖自行车";
        com.number = "18715178256";
        while (true) {
            System.out.println("*******************");
            System.out.println("1.添加公司员工");
            System.out.println("2.显示员工信息");
            System.out.println("3.显示公司信息");
            System.out.println("4.显示公司总人数");
            System.out.println("5.辞退员工");
            System.out.println("6.查找薪水最高的员工");
            System.out.println("6.输入0退出");
            System.out.println("请输入您的选择");
            int chioce = input.nextInt();
            switch (chioce) {
                case 1:
                    System.out.println("请输入招聘的员工姓名");
                    String name = input.next();
                    System.out.println("请输入招聘员工的年龄");
                    int age = input.nextInt();
                    System.out.println("请输入招聘员工的性别");
                    char sex = input.next().charAt(0);
                    System.out.println("请输入招聘员工部门");
                    String post = input.next();
                    System.out.println("请输入招聘员工的月工资");
                    double salary = input.nextDouble();
                    com.add(name, age, sex, post, salary);
                    break;
                case 2:
                    com.showStaff();
                    break;
                case 3:
                    com.showCompany();
                    break;
                case 4:
                    com.getCount();
                    break;
                case 5:
                    System.out.println("请输入您要辞退员工的姓名");
                    String sname=input.next();
                    com.fire(sname);
                    break;
                case 6:
                    com.findTopSlary();
                    break;
                    default:
                        break;

            }
            if (chioce==0){
                System.out.println("退出系统");
                break;
            }
        }
    }
}
